# Replication Files for Figures 1 -- 3 #

## Structure ##

The contents of this directory provide the code and data assets necessary to
replicate figures 1-3 & 5.

Some core dependencies are in ./etc.
The code to do so is in ./src.
The output from this code is in ./data.
The figures summarizing this output are in ./doc.

## Computation ##

The heart of the computation was run on a High-Performance computing system at
Princeton University. The necessary code is in ./src/SLURM and calls code
./src/R. However, without a sufficiently similar HPC setup, this code will not
run as is and is not portable --- nor could it be given the amount of
computation covered by these HPC jobs.

The results, however, are all in algorithm and chamber specific directories
under ./data/RDATA/estimates.

## Figure Replication ##

The following outlines how to replicate the published figures given the
estimates in ./data/RDATA/estimates.

### Figure 1

Runtimes by method across chambers and sessions of Congress

05-summarizeTimes.r --> ../doc/fig/runtimes_base.pdf

### Figure 2

Cross-method correlation of point estimates for the 112th Congress

11-summarizePointEstimates.r --> ../doc/fig/points_base.pdf

### Figure 3

Comparison of MCMC-based standard errors and variational EM w/ Bootstrap
standard errors for the 112th House of Representatives

12-compareIntervals.r --> ../doc/fig/intervals_base.pdf

### Figure 5

Comparison of scalability of Variational EM algorithm with W-NOMINATE as
dimensions increase

08-summarizeMC.r --> ../doc/fig/scaling_base.pdf
